<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      th:replace="layout">
<div class="content" th:fragment="content">
    <div class="skins-nav">
        <a href="#" class="skin first_nav selected">
            <span class="icon"></span><span class="text">首页</span>
        </a>
    </div>
    <div class="container-fluid">
        <div id="pad-wrapper" class="new-user">
            <div class="row-fluid header rgst-header">
                <h3>查写<span th:text="${busi.title}"></span>报名信息</h3>
            </div>
            <div class="row-fluid form-wrapper">
                <div class="span9 with-sidebar">
                    <div class="container">
                        <form class="new_user_form inline-input" id="enroll" action="enroll/submit" method="post"/>
                        <input type="hidden" th:value="${busi.id}" name="busiId">
                        <input type="hidden" th:value="${busi.title}" name="desc">

                        <div class="span12 field-box">
                            <label>学生姓名:</label>
                            <input class="span9" type="text" name="name"/>
                        </div>
                        <div class="span12 field-box">
                            <label>学生姓别:</label>
                            <div class="ui-select span5">
                                <select name="sex">
                                    <option value="1">男</option>
                                    <option value="0">女</option>
                                </select>
                            </div>
                        </div>
                        <div class="span12 field-box">
                            <label>民族：</label>
                            <div class="ui-select span5">
                                <select name="nation">
                                    <option th:each="nation : ${nationList}" th:value="${nation.value}"
                                            th:text="${nation.value}"></option>
                                </select>
                            </div>
                        </div>
                        <div class="span12 field-box">
                            <label>身份证号:</label>
                            <input class="span9" type="text" name="idno"/>
                        </div>
                        <div class="span12 field-box">
                            <label>年级:</label>
                            <div class="ui-select span5">
                                <select name="grade" onchange="changeGradeValue(this)">
                                    <option th:each="grade : ${gradeList}" th:value="${grade.value}"
                                            th:text="${grade.value}" style="width:90%">不可用
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div class="span12 field-box">
                            <label>班级:</label>
                            <div class="ui-select span5">
                                <select name="className" id="className">
                                    <option th:each="class : ${classList}" th:value="${class.value}"
                                            th:text="${class.value}" style="width:90%">不可用
                                    </option>
                                </select>
                            </div>
                        </div>
                        <div th:if="${extFields != null}" th:each="field ,userStat: ${extFields}">
                            <label th:text="|${field.title}:|"></label>
                            <input type="hidden" th:name="|extFields[${userStat.index}].name|" th:value="${field.name}">
                            <input type="hidden" th:name="|extFields[${userStat.index}].title|"
                                   th:value="${field.title}">
                            <input type="hidden" th:name="|extFields[${userStat.index}].enrollId|"
                                   th:value="${busi.id}">
                            <input class="span9" type="text" th:name="|extFields[${userStat.index}].value|"
                                   th:placeholder="${field.remark}" style="height: 50px"/>
                        </div>
                        <div class="span12 field-box textarea">
                            <label>备注:</label>
                            <textarea class="span9" name="remark"></textarea>
                        </div>
                        <div class="span11 mid-btn actions">
                            <input type="submit" class="rgst-btn" value="提 交"/>
                        </div>
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</html>